import api from "@/utils/api";
export const global = defineStore("global", {
  state: () => {
    return {
      categoryList: [],
      cityList:[]
    };
  },
  actions: {
    getCategoryApi() {
      api.post("/serviceCategory/queryList").then((res) => {
        this.categoryList = res;
      });
    },
    getCityApi() {
      api.post("/city/queryList",{keyword:''}).then((res) => {
        this.cityList = res;
      });
    },
  },
  persist: true,
});
